package com.vimhe.ezimp2.handler.formatter.support;

import com.vimhe.ezimp2.handler.Formatter;

import java.text.DecimalFormat;

/**
 * 数字格式化转换器
 *
 * @author Vimhe
 */
public class NumberFormatter implements Formatter<Number> {

    @Override
    public String name() {
        return "numberFormatter";
    }

    @Override
    public String format(Number cellValue, String formatterValue) {
        return new DecimalFormat(formatterValue).format(cellValue);
    }

}
